/**
 * 
 */
package com.kcwx.web.controller.tool;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.kcwx.common.core.domain.AjaxResult;
import com.kcwx.common.core.domain.entity.SysMenu;
import com.kcwx.system.service.ISysMenuService;

/**
 * 
 * @author phx
 * @date 2023年2月15日 上午8:58:12
 */
@RequestMapping("/test")
@RestController
public class TestController {
	@Autowired
	private ISysMenuService menuService;

	@GetMapping("/getRouters")
	public AjaxResult getRouters() {
		Long userId = 1L;
		List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
		return AjaxResult.success(menuService.buildMenus(menus));
	}
	
	
}
